from geoserver.catalog import Catalog
cat = Catalog("http://localhost:8011/geoserver/rest", username="admin", password="geoserver")
geosolutions = cat.get_workspace("sf")
import geoserver.util
shapefile_plus_sidecars = geoserver.util.shapefile_and_friends("D:/data_dir2/data/vector/states")

# shapefile_and_friends should look on the filesystem to find a shapefile
# and related files based on the base path passed in
#
# shapefile_plus_sidecars == {
#    'shp': 'states.shp',
#    'shx': 'states.shx',
#    'prj': 'states.prj',
#    'dbf': 'states.dbf'
# }
# 'data' is required (there may be a 'schema' alternative later, for creating empty featuretypes)
# 'workspace' is optional (GeoServer's default workspace is used by... default)
# 'name' is required

ft = cat.create_featurestore("pythonVec1", shapefile_plus_sidecars, geosolutions)